package cn.cqie.attendance.teacher.service;

import cn.cqie.attendance.common.util.Page;
import cn.cqie.attendance.common.util.PageBean;
import cn.cqie.attendance.teacher.pojo.TeacherLeave;
import cn.cqie.attendance.teacher.pojo.TeacherLeaveLog;
import org.apache.ibatis.annotations.Param;
import org.springframework.stereotype.Service;

import java.text.ParseException;
import java.util.Date;
import java.util.List;
import java.util.Map;

/**
 * @author wqh
 * @date 2021/6/21 17:14
 */
@Service
public interface TeacherLeaveService {
    /**
     * 老师查看自己课程下学生的请假信息
     * @param
     * @return TeacherLeave
     */
    PageBean<TeacherLeave> queryLeaveByTeacherId(Date beginTime,Date endTime,Integer collegeId,Integer majorId,Integer gradeId,Integer classId,String stuNumber,String stuName,String leaveTheme,Integer leaveReason,Integer leaveStatus,Integer pageNum,Integer pageSize);
    /**
     * 查看该老师课程下的学生的请假详情
     * @param leaveId
     * @return TeacherLeave
     */
    Page queryLeaveInfoByLeaveId(Integer leaveId);


    /**
     * 某一个请假信息的请假流程管理
     * @param leaveId
     * @return List<TeacherLeaveLog>
     */
    PageBean<TeacherLeaveLog> queryLeaveLogInfoByLeaveLogId(Integer leaveId,Integer pageNum,Integer pageSize);

    /**
     * 根据请假id修改请假状态（审批通过）
     * @param leaveIds
     * @return success/fail
     */
    Page updateLeaveStatusByLeaveId(String[] leaveIds,Integer headmaster) throws ParseException;
    /**
     * 根据请假id修改请假状态（审批不通过）
     * @param leaveId
     * @return success/fail
     */
    Page updateLeaveByLeaveId(Integer leaveId,String failedDetail,String reasonDetail,Integer headmaster,Integer stuId) throws ParseException;
   /* *//**
     * 修改请假状态插入一条日志记录
     * @param
     * @return success/fail
     *//*
    Page insertIntoLeaveLog(Integer leaveId, Integer leaveStatus, String reasonDetail, String failedDetail) throws ParseException;
*/
    /**
     * 根据id删除一条请假信息(可以批量删除)
     * @param leaveIds
     * @return success/fail
     */
    Page deleteLeaveByLeaveId(String leaveIds,Integer headmaster);

/*    *//**
     * 根据id删除一条请假日志信息（可以批量删除）
     * @param leaveLogIds
     * @return success/fail
     *//*
    Page deleteLeaveLogByLeaveLogId(String leaveLogIds);*/
}
